﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.Serialization;
using System.Data;

namespace CMD.BAL.AUTH
{
    [DataContractAttribute]
    public class VisibilityDiv
    {
        [DataMemberAttribute(EmitDefaultValue = false)]
        public string dsc_divSolicitud;
        public static VisibilityDiv GetDataDivVisibility(string unidRol)
        {
            try
            {
                VisibilityDiv vd;
                DataTable dt = CMD_WEB.DAL.SrvDB.ExecuteQuery("exec SP_CMD_GET_DIV_SOL'" + unidRol + "'");
                if (dt.Rows.Count == 0)
                {
                    return null;
                }
                else if (unidRol == null)
                {
                    return null;
                }
                else
                {
                    vd = new VisibilityDiv(Convert.ToString(dt.Rows[0]["DSC_DIVSOLICITUD"]));
                }
                return vd;
            }
            catch (Exception ex)
            {

                throw ex;
            }
        }
        public VisibilityDiv()
        {
            dsc_divSolicitud="";   
        }
        public VisibilityDiv(string dsc_divSolicitud)
        {
            this.dsc_divSolicitud = dsc_divSolicitud;
        }
    }
}
